/**
 * @Author: easten
 * @Created: 2024-05-13 23:02:02
 * @Description: TagItem 组件
 *
 */
import React, { useEffect } from "react";
import { Tag } from "tdesign-react";
type TagItemProps = {
  label: string;
  value: string | number;
  tagColor?:
    | string
    | "blue"
    | "green"
    | "red"
    | "yellow"
    | "purple"
    | "gray"
    | "cyan"
    | "orange"
    | "pink"
    | "default";
  outline?: boolean;
};
const TagItem: React.FC<TagItemProps> = (props: TagItemProps) => {
  const { tagColor, label, value, outline } = props;
  useEffect(() => {
    return () => {};
  }, []);
  return (
    <div className="flex flex-row justify-center items-center ml-5">
      <span>{label}：</span>
      <Tag
        color={tagColor ?? "default"}
        variant={outline ? "outline" : undefined}
      >
        {value}
      </Tag>
    </div>
  );
};
export default TagItem;
